x86/p2m: re-arrange {,__}put_gfn()
authorJan Beulich <jbeulich@suse.com>
Fri, 8 Apr 2022 12:47:11 +0000 (14:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 8 Apr 2022 12:47:11 +0000 (14:47 +0200)
commit819cdc5a7301222f0f5f9260cfe8cd9c87d81f2f
treebb2e2b081e078b63f0fefc1c4bd04215a02421b3
parentaa70b8959915b67b4e7a2516f743ab6ffe0f8a1b
x86/p2m: re-arrange {,__}put_gfn()

All explicit callers of __put_gfn() are in HVM-only code and hold a valid
P2M pointer in their hands. Move the paging_mode_translate() check out of
there into put_gfn(), renaming __put_gfn() and making its GFN parameter
type-safe.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/include/asm/p2m.h
xen/arch/x86/mm/hap/nested_hap.c
xen/arch/x86/mm/p2m.c